package tp.badugi.net.exceptions;

/**
 * Thrown when creating a new table results in an exception.
 * <p>
 * Intended for when the table name is already taken.
 * 
 * @author bartek
 *
 */
public class NameTakenException extends Exception {

	/**
	 * Used during deserialization.
	 */
	private static final long serialVersionUID = -5486612329237750382L;
	
	/**
	 * Constructs a new exception with null as its detail message.
	 */
	public NameTakenException() {
		super();
	}

	/**
	 * Constructs a new exception with the specified detail message and cause.
	 * <p>
	 * Note that the detail message associated with <code>cause</code> is not automatically 
	 * incorporated in this exception's detail message.
	 * 
	 * @param message the detail message (which is saved for later retrieval 
	 * by the {@link Throwable#getCause()} method).
	 * @param cause the cause (which is saved for later retrieval by the 
	 * {@link Throwable#getCause()} method). (A null value is permitted, 
	 * and indicates that the cause is nonexistent or unknown.)
	 */
	public NameTakenException(String message, Throwable cause) {
		super(message, cause);
	}

	/**
	 * Constructs a new exception with the specified detail message.
	 * 
	 * @param message the detail message. The detail message is saved 
	 * for later retrieval by the {@link Throwable#getCause()} method.
	 */
	public NameTakenException(String message) {
		super(message);
	}

	/**
	 * Constructs a new exception with the specified cause and a detail message of 
	 * <code>(cause==null ? null : cause.toString())</code> 
	 * (which typically contains the class and detail message of <code>cause</code>).
	 * 
	 * @param cause the cause (which is saved for later retrieval by the 
	 * {@link Throwable#getCause()} method). (A null value is permitted, 
	 * and indicates that the cause is nonexistent or unknown.)
	 */
	public NameTakenException(Throwable cause) {
		super(cause);
	}
	
}